package cn.yanjr.system.action;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.yanjr.common.CurrentInfoUtil;
import cn.yanjr.common.bean.BeanFactory;
import cn.yanjr.common.utils.Result;
import cn.yanjr.common.web.BaseServlet;
import cn.yanjr.system.service.SysDictService;

@WebServlet("/sys/dict/*")
public class SysDictAction extends BaseServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3798209063088465579L;
	
	private SysDictService sysDictService = BeanFactory.getBean("sysDictService", SysDictService.class);

	public void query(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		System.out.println("------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
		
		Map<String, Object> param = CurrentInfoUtil.getParamMap(request);
		Map<String, Object> result = sysDictService.queryPage(param);
		
		CurrentInfoUtil.responsePrint(response, Result.success(result));
	}
	
	
	
	
}
